﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Defaults.cshtml";
}

<div ng-app="app" ng-controller="DemoCtrl">
                
    
      <a class="btn btn-info" ng-click="appDialog(false,null)">
										<i class="glyphicon glyphicon-plus icon-white"></i>  
										Thêm mới                                           
	</a> 
     <table class="table table-striped table-bordered bootstrap-datatable datatable">
            <tr>
                <th>Tên Nhân Viên</th>
                <th>Đạo Pháp</th>
                <th>Thời Gian</th>
                <th></th>
            </tr>
            <tr ng-repeat="task in tasks">
                <td> {{task.tENNV}}</td>
                <td> {{task.tENDP}}</td>
                <td> {{task.tGDP}}</td>

                 <td class="center">                  
                     <div ng-show="showEdit()">
                                <a class="btn btn-info" ng-click="appDialog(true,task)">
										<i class="icon-edit icon-white"></i>  
										Sửa                                            
									</a>
                            </div>
                                <div ng-show="showDelete()">
									<a class="btn btn-danger" ng-click="delete(task.iD)">
										<i class="icon-trash icon-white"></i> 
										Xóa
									</a>
                             </div>
                </td>  
            </tr>
        </table>

        <div ng-controller="DialogCtrl">
            <jqdialog dialog-name="App" title="'Vu'"
                      auto-open="false" width="700" height="300"
                      on-open="onOpen" buttons="{'Lưu': onOk, 'Hủy': onCancel, 'Đóng': 'close' }"
                      args-to-scope="true"
                      before-close="beforeClose">
                <form class="form-horizontal">
                    <fieldset>
                        <div class="control-group">
							  <label class="control-label" for="tGDP">Thời Gian : </label>
							  <div class="controls">
								<input id="tGDP" ng-model="obj.tGDP"/>				
							  </div>
						</div>
                         <div class="control-group">
                                  <label class="control-label" for="selectError">Nhân viên</label>
                                  <div class="controls">                                       
                                       <select ng-model="obj.nVID" id="nVID" >
                                            <option ng-repeat="item in nvs" value="{{item.iD}}">{{item.hONV}}  {{item.tENNV}}</option>
                                        </select>

                                  </div>
                         </div>

                          <div class="control-group">
                                  <label class="control-label" for="selectError">Đạo Pháp</label>
                                  <div class="controls">
                                        <select ng-model="obj.dPID" id="dPID" >
                                            <option ng-repeat="item in dps" value="{{item.iD}}">{{item.tENDP}}</option>
                                        </select>
                                  </div>
                          </div>
                        
                        
                    </fieldset>
                </form>                
            </jqdialog>
        </div>

 </div>
<script src="~/Content/lib/jquery-1.8.3.js"></script>
<script src="~/Content/lib/jquery-ui.js"></script>
<script src="~/Content/lib/angular.js"></script>
<script src="~/Content/lib/module.js"></script>
<script src="~/Content/js/jqdialog/jqdialog.js"></script>
<script src="~/Content/md/dtdp/dtdp.js"></script>
<script>
    $("#dscv").html("Danh Sách Đào Tạo Đại Pháp");
</script>